<!-- 自用网站，链接 -->
<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <title>webIndex</title>

        <meta http-equiv="Expires" content="0">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
        <meta http-equiv="Cache" content="no-cache">

        <link href="css/main.css?version=0.2" rel="stylesheet" type="text/css">
        <link href="css/search.css?version=0.1" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="/favicon.png" type="image/png" />


        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Pushster&display=swap" rel="stylesheet">

        <script src="js/search.js"></script>
    </head>
    <body>
        <div id="nav">
            <h1>webIndex</h1>
            <hr />
            <div class="nav-list">
                <ul class="list">
                    <li><a href="#search">搜索</a> </li>
                    <li><a href="#ChangYong">常用</a></li>
                    <li><a href="#BianCheng">编程</a></li>
                    <li><a href="#YingJian">硬件</a></li>
                    <li><a href="#SheJi">设计</a></li>
                    <li><a href="#APIAndDoc">API&amp;Doc</a></li>
                    <li><a href="#Tools">实用工具</a> </li>
                    <li><a href="#ZiYuanAndFengXiang">资源&amp;分享</a></li>
                    <li><a href="#YouQuDeWangZhi">有趣的网址</a></li>
                    <br />
                    <hr />
                    <li><a href="#GuanYu">关于本网站</a></li>
                </ul>
            </div>
        </div>

        <div id="main">
            
            <div id="link-div">
                最后更新于2021-12-28 20:22

                <div class="search">
                    <h2><a name="search">搜索</a></h2>
                    <hr />
                    <form class="searchForm">
                        <img id="searchEngineIco" src="https://cdn.jsdelivr.net/gh/ruxia-TJY/webicon@latest/png/bing.png" onclick='openEngineWebsite()'>

                        <input class="searchBox" type="text" name="search" id="searchInput" autocomplete="off" autofocus="autofocus">

                        <button id="searchBtn" onclick="startSearch()">搜索</button>
                        <br />
                        <br />
                        <div class="searchEngineBox">
                            <input class="radioEngine" type="radio" name="searchEngine" id="bing" onclick='setSearchEngine("bing")'><label for="bing">Bing</label>
                            <input class="radioEngine" type="radio" name="searchEngine" id="google" onclick='setSearchEngine("google")'><label for="google">谷歌</label>
                            <input class="radioEngine" type="radio" name="searchEngine" id="baidu" onclick='setSearchEngine("baidu")'><label for="baidu">百度</label>
                            <input class="radioEngine" type="radio" name="searchEngine" id="github" onclick='setSearchEngine("github")'><label for="github">Github</label>
                            <input class="radioEngine" type="radio" name="searchEngine" id="gitee" onclick='setSearchEngine("gitee")'><label for="gitee">Gitee</label>
                        </div>
                    </form>
                    <br />
                    <br />
                </div>

                <div id="ChangYong"></div>
                <div id="BianCheng"></div>
                <div id="YingJian"></div>
                <div id="SheJi"></div>
                <div id="APIAndDoc"></div>
                <div id="Tools"></div>
                <div id="ZiYuanAndFengXiang"></div>
                <div id="YouQuDeWangZhi"></div>


                <h2><a name="GuanYu">关于 本网站</a></h2>

                <div id='footer' style="background: url('https://cdn.jsdelivr.net/gh/ruxia-TJY/BlogUse@latest/cover/cover.jpg');background-repeat: no-repeat; background-size: cover;">
                    <p style="font-size: 60px;font-family: 'Pushster', cursive;padding: 60px;"><b>webIndex</b></p>

                    <br /><br />
                    <div>
                        <p class="info">本页面是我为了链接导航而写。</p>
                        <p class="info">其中存储了我珍藏的网址。</p>
                        <p class="info">推荐打开网页刷新一下，有时候添加的网址会无法显示</p>
                        <p class="info">有想添加的网址，<a href="https://gitee.com/ruxia-tjy/ruxia-tjy/issues" style="color: #f2fdff;">点此推荐</a></p>
                    </div>

                    <br /><br />
                    <div id="footer-link">
                        <p style="font-size: 18px"><b>访问我</b></p><br />
                        <a href="https://gitee.com/ruxia-tjy">Gitee</a> |
                        <a href="https://github.com/ruxia-tjy">Github</a> |
                        <a href="https://blog.jiayublog.cn">博客</a> |
                        <a href="https://space.bilibili.com/472663791">B站</a>
                    </div>
                    <br /><br />

                    <hr />
                    <br />
                    <p class="info">&copy; 2021 涂家宇, All rights reserved.</p>
                    
                    <br /><br />


                </div>
            </div>

        </div>
    </body>
    <script>
        // li绑定事件，打开a的链接
        var itemli = document.getElementsByTagName("li");
        for(var i = 0; i<itemli.length; i++){
    　　　　itemli[i].onclick = function(){
                var xa = this.getElementsByTagName('a');
                window.location.href = xa[0].href;
    　　　　}
        }

        function clearAllCookie() {
            // 此函数复制于互联网。
            // 著作权归原作者所有。
            // 商业转载请联系作者获得授权，非商业转载请注明出处。
            // 作者：Pokio
            // 链接：https://pokio.fun/posts/c1895563.html
            // 来源：イリヤのPokio
            var date=new Date();
            date.setTime(date.getTime()-10000);
            //keys为所要删除cookie的名字
            var keys=document.cookie.match(/[^ =;]+(?=\=)/g);
            //删除所有cookie
            if (keys) {
                for (var i =  keys.length; i--;)
                    document.cookie=keys[i]+"=0; expire="+date.toGMTString()+"; path=/";
            }
        }

        window.onload = function () {
            clearAllCookie();
            loadJson();
            chooseDefaultEngineRadio();
        }


        // 读取数据库
        function loadJson(){
            var url = 'db.json?timestamp' + new Date().getTime();
            var request = new XMLHttpRequest();
            request.open("get",url);
            request.send(null);
            request.onload = function (){
                if(request.status == 200){
                    var json = JSON.parse(request.responseText);
                    var div_html = ""
                    for(var title_i = 0;title_i < json["标题"].length;title_i++){
                        t = json["标题"][title_i];
                        tK = json[t]["nameKey"];
                        div_html = "<h2><a name='#" + tK + "'>" + t + "</a></h2><ul>"

                        for(var url_i = 0;url_i < json[t]["list"].length;url_i++){
                            l = ""
                            switch (json[t]["list"][url_i]["y"]){
                                case 0:
                                    l = "<hr /><abbr title='" + json[t]["list"][url_i]["t"] + "'>" + json[t]['list'][url_i]["n"] + "</abbr>"
                                    break
                                case 1:
                                    l = "<li><a href='" + json[t]["list"][url_i]["l"] +  "'><abbr title='" + json[t]["list"][url_i]["t"] + "'>" + json[t]["list"][url_i]["n"] + "</abbr></a></li>"
                                    break
                            }
                            div_html += l
                        }
                        div_html += '</ul><br /><br /><br /><hr />'

                        document.getElementById(tK).innerHTML = div_html;
                    }
                }
            }
        }
    </script>
</html>